package com.ruoyi.project.business.punch.service;

import com.ruoyi.project.business.punch.entity.ScheduleClockPunch;
import com.ruoyi.project.business.punch.request.AddClockPunchRequest;
import com.ruoyi.project.business.punchhelp.request.SaveOrUpdatePunchRequest;
import com.ruoyi.project.business.punchhelp.response.PunchWithUserResponse;
import com.ruoyi.project.system.entity.SysUser;

import java.time.LocalDate;
import java.util.Date;
import java.util.List;

/**
 * 打卡Service接口
 * 
 * @author thanks
 * @date 2024-02-05
 */
public interface IScheduleClockPunchService {
    /**
     * 查询打卡
     * 
     * @param id 打卡ID
     * @return 打卡
     */
    public ScheduleClockPunch selectScheduleClockPunchById(Long id);

    /**
     * 查询打卡列表
     * 
     * @param scheduleClockPunch 打卡
     * @return 打卡集合
     */
    public List<ScheduleClockPunch> selectScheduleClockPunchList(ScheduleClockPunch scheduleClockPunch);

    /**
     * 新增打卡
     * 
     * @param scheduleClockPunch 打卡
     * @return 结果
     */
    public int insertScheduleClockPunch(ScheduleClockPunch scheduleClockPunch);

    /**
     * 修改打卡
     * 
     * @param scheduleClockPunch 打卡
     * @return 结果
     */
    public int updateScheduleClockPunch(ScheduleClockPunch scheduleClockPunch);

    /**
     * 批量删除打卡
     * 
     * @param ids 需要删除的打卡ID
     * @return 结果
     */
    public int deleteScheduleClockPunchByIds(Long[] ids);

    /**
     * 删除打卡信息
     * 
     * @param id 打卡ID
     * @return 结果
     */
    public int deleteScheduleClockPunchById(Long id);

    void fillPunchDatas(List<PunchWithUserResponse> punches, Date yearMonth, Long tenantId);

    void saveOrUpdate(SaveOrUpdatePunchRequest request, Long operatorId, Long tenantId);

    int punchClock(AddClockPunchRequest request, SysUser operator, Long tenantId);

    ScheduleClockPunch queryByDate(LocalDate date, Long userId, Long tenantId);
}
